import java.util.concurrent.atomic.AtomicInteger;

import org.jsoup.Connection;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

public class Walk2 extends Thread {

	private static AtomicInteger ai = new AtomicInteger(13015941);

	public void run() {
		while (true) {
			int i = ai.getAndDecrement();
			String url = "http://my.hupu.com/" + i + "/profile";
			try {
				Connection c = Jsoup.connect(url);

				c.userAgent("Mozilla/5.0 (Windows NT 6.2; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0");

				/*c.cookie(
						"u",
						"16889660%7C5L2p5pav5bC95Yqb5LqG%7C8c2d%7C636e22ba282294cc75fe6b87217460fc%7C282294cc75fe6b87");
				c.cookie("ua", "22271579");
				c.cookie("PHPSESSID", "481a17c91b841a1ab13339964b674d6a");*/
				
				
				c.header("Cookie","urtime=1358579259; PHPSESSID=dc8640f1172d91a32cd6e70e66f390e9; u=16890379%7C5aSp56m65beo5ZON%7C8c2d%7C0376eedd2a4d6ae6b6efc225c0aabe15%7C2a4d6ae6b6efc225; ua=16983220");
				

				c.referrer("http://my.hupu.com/Tracy_Mcgrady");

				c.get();
				System.out.println(i);

			} catch (Exception e) {
				System.out.println(e.getMessage());
			}
		}

	}

	public static void main(String[] args) {
		for (int i = 0; i < 100; i++) {
			new Walk2().start();
		}
	}
}
